3.3036 \(\int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx\)

Optimal. Leaf size=135 \[ \frac{(a+b x)^{-n} (e+f x)^{n+1} \left (-\frac{f (a+b x)}{b e-a f}\right )^n (b (2 c f-d e (1-n))-a d f (n+1)) \, _2F_1\left (n,n+1;n+2;\frac{b (e+f x)}{b e-a f}\right )}{2 b f^2 (n+1)}+\frac{d (a+b x)^{1-n} (e+f x)^{n+1}}{2 b f} \]

[Out]

(d*(a + b*x)^(1 - n)*(e + f*x)^(1 + n))/(2*b*f) + ((b*(2*c*f - d*e*(1 - n)) - a*
d*f*(1 + n))*(-((f*(a + b*x))/(b*e - a*f)))^n*(e + f*x)^(1 + n)*Hypergeometric2F
1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(2*b*f^2*(1 + n)*(a + b*x)^n)

_______________________________________________________________________________________

Rubi [A]  time = 0.215309, antiderivative size = 134, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136 \[ \frac{(a+b x)^{-n} (e+f x)^{n+1} \left (-\frac{f (a+b x)}{b e-a f}\right )^n (-a d f (n+1)+2 b c f-b d e (1-n)) \, _2F_1\left (n,n+1;n+2;\frac{b (e+f x)}{b e-a f}\right )}{2 b f^2 (n+1)}+\frac{d (a+b x)^{1-n} (e+f x)^{n+1}}{2 b f} \]

Antiderivative was successfully verified.

[In]  Int[((c + d*x)*(e + f*x)^n)/(a + b*x)^n,x]

[Out]

(d*(a + b*x)^(1 - n)*(e + f*x)^(1 + n))/(2*b*f) + ((2*b*c*f - b*d*e*(1 - n) - a*
d*f*(1 + n))*(-((f*(a + b*x))/(b*e - a*f)))^n*(e + f*x)^(1 + n)*Hypergeometric2F
1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(2*b*f^2*(1 + n)*(a + b*x)^n)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 21.8258, size = 105, normalized size = 0.78 \[ \frac{d \left (a + b x\right )^{- n + 1} \left (e + f x\right )^{n + 1}}{2 b f} - \frac{\left (\frac{f \left (a + b x\right )}{a f - b e}\right )^{n} \left (a + b x\right )^{- n} \left (e + f x\right )^{n + 1} \left (- 2 b c f + d \left (a f \left (n + 1\right ) + b e \left (- n + 1\right )\right )\right ){{}_{2}F_{1}\left (\begin{matrix} n, n + 1 \\ n + 2 \end{matrix}\middle |{\frac{b \left (- e - f x\right )}{a f - b e}} \right )}}{2 b f^{2} \left (n + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((d*x+c)*(f*x+e)**n/((b*x+a)**n),x)

[Out]

d*(a + b*x)**(-n + 1)*(e + f*x)**(n + 1)/(2*b*f) - (f*(a + b*x)/(a*f - b*e))**n*
(a + b*x)**(-n)*(e + f*x)**(n + 1)*(-2*b*c*f + d*(a*f*(n + 1) + b*e*(-n + 1)))*h
yper((n, n + 1), (n + 2,), b*(-e - f*x)/(a*f - b*e))/(2*b*f**2*(n + 1))

_______________________________________________________________________________________

Mathematica [C]  time = 0.607406, size = 192, normalized size = 1.42 \[ (a+b x)^{-n} (e+f x)^n \left (\frac{3 a d e x^2 F_1\left (2;n,-n;3;-\frac{b x}{a},-\frac{f x}{e}\right )}{6 a e F_1\left (2;n,-n;3;-\frac{b x}{a},-\frac{f x}{e}\right )+2 n x \left (a f F_1\left (3;n,1-n;4;-\frac{b x}{a},-\frac{f x}{e}\right )-b e F_1\left (3;n+1,-n;4;-\frac{b x}{a},-\frac{f x}{e}\right )\right )}+\frac{c (e+f x) \left (\frac{f (a+b x)}{a f-b e}\right )^n \, _2F_1\left (n,n+1;n+2;\frac{b (e+f x)}{b e-a f}\right )}{f (n+1)}\right ) \]

Warning: Unable to verify antiderivative.

[In]  Integrate[((c + d*x)*(e + f*x)^n)/(a + b*x)^n,x]

[Out]

((e + f*x)^n*((3*a*d*e*x^2*AppellF1[2, n, -n, 3, -((b*x)/a), -((f*x)/e)])/(6*a*e
*AppellF1[2, n, -n, 3, -((b*x)/a), -((f*x)/e)] + 2*n*x*(a*f*AppellF1[3, n, 1 - n
, 4, -((b*x)/a), -((f*x)/e)] - b*e*AppellF1[3, 1 + n, -n, 4, -((b*x)/a), -((f*x)
/e)])) + (c*((f*(a + b*x))/(-(b*e) + a*f))^n*(e + f*x)*Hypergeometric2F1[n, 1 +
n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(f*(1 + n))))/(a + b*x)^n

_______________________________________________________________________________________

Maple [F]  time = 0.086, size = 0, normalized size = 0. \[ \int{\frac{ \left ( dx+c \right ) \left ( fx+e \right ) ^{n}}{ \left ( bx+a \right ) ^{n}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((d*x+c)*(f*x+e)^n/((b*x+a)^n),x)

[Out]

int((d*x+c)*(f*x+e)^n/((b*x+a)^n),x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int{\left (d x + c\right )}{\left (b x + a\right )}^{-n}{\left (f x + e\right )}^{n}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x + c)*(f*x + e)^n/(b*x + a)^n,x, algorithm="maxima")

[Out]

integrate((d*x + c)*(b*x + a)^(-n)*(f*x + e)^n, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (d x + c\right )}{\left (f x + e\right )}^{n}}{{\left (b x + a\right )}^{n}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x + c)*(f*x + e)^n/(b*x + a)^n,x, algorithm="fricas")

[Out]

integral((d*x + c)*(f*x + e)^n/(b*x + a)^n, x)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x+c)*(f*x+e)**n/((b*x+a)**n),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (d x + c\right )}{\left (f x + e\right )}^{n}}{{\left (b x + a\right )}^{n}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x + c)*(f*x + e)^n/(b*x + a)^n,x, algorithm="giac")

[Out]

integrate((d*x + c)*(f*x + e)^n/(b*x + a)^n, x)